import QtQuick 2.0

Rectangle {
    property alias text: text.text;
    property bool checked: false;
    signal clicked;

    id: root;
    width: text.width + 16;
    height: text.height + 10;
//    border.width: checked ? 2 : 0;
//    border.color: "slategrey";
    color: checked ? "blue" : "lightsteelblue";

    Text {
        id: text;
        anchors.centerIn: parent;
        color: "white";
        text: qsTr("DButton");
    }

    MouseArea {
        anchors.fill: parent;
        onClicked: {
            root.clicked();
        }
    }
}
